package ws

import (
	"golang.org/x/net/websocket"
	"net/http"
	"gitee.com/cooge/impush/ws/conn"
)

type WsServer struct {

}

func NewWsServer()*WsServer{
	var ws WsServer
	return &ws
}

func(this *WsServer)handler(wsconn *websocket.Conn){
    ws:=conn.NewWsConn(wsconn)
    ws.Start()
}

func(this *WsServer)start(){
	http.Handle("/ws", websocket.Handler(this.handler))
}


func Start()  {
	ww:=NewWsServer()
	ww.start()
}

